#!/usr/bin/python
"""#########################################"""
"""       python program by 		    """
"""			date:		    """
"""#########################################"""



import os
import sys
import re
#import RawConfigParser
import ConfigParser

ddd = os.popen('net config workstation')
a = ddd.readlines()
for x in a:
	if re.search('NetBT_Tcpip_',x.rstrip()):
		sss = x.split(' ',1)[0]
fi = re.split('\{',sss)[1]
sc = re.split('\}',fi)[0]
config = ConfigParser.RawConfigParser()
config.read('d:/tools/spilot_set/netset/netset.ini')
config.set('global','nic_number',sc)
config.write(open('d:/tools/spilot_set/netset/netset.ini','w'))
